<!--
    * Time    : 2021-03-11 13:43:17
    * Author  : zhangTj
    * Desc    : 文字(textarea类型)组件
-->

<template>
    <div class="p-15p">
        <div class="font-14">
            <span class="text-danger" v-if="value.required">*</span>
            {{ index + 1 }}.{{ value.title }}
        </div>
        <div class="py-1">
            <van-field
                v-model="value.content"
                :maxlength="value.maxLength"
                clearable
                show-word-limit
                autosize
                type="textarea"
                placeholder="请输入内容"
            />
        </div>
    </div>
</template>

<script>
export default {
    name: 'TextAreaInput',
    props: {
        value: Object,
        index: {
            type: Number | String,
            default: 0
        }
    }
}
</script>
